package com.lgCore.util.model;

/**
 * Created by by on 2020/11/24 11:23
 */
public enum HeadType {
    LOGIN_REQUEST(0), //登录请求
    LOGIN_RESPONSE(1), //登录响应
    LOGINOUT_REQUEST(2),  //登出请求
    LOGINOUT_RESPONSE(3), //登出响应
    HEART_REQUEST(4), //心跳请求
    HEART_RESPONSE(5), //心跳响应
    RPC_REQUEST(6), //rpc请求
    RPC_RESPONSE(7); //rpc响应
    private int type;
    HeadType(int type){
        this.type =type;
    }
    public static HeadType findByType(int type) {
        HeadType[] headTypes = HeadType.values();
        for (int i = 0; i < headTypes.length; i++) {
            if (headTypes[i].type==type) {
                return headTypes[i];
            }
        }
        return null;
    }

}
